
public class BeatController implements IBeatController
{
	IBeatModel model;
	DJView     view;
	
	public BeatController(IBeatModel model)
	{
		this.model = model;
		
		//++ need to initizlie view
		view = new DJView(this, model);
		view.createView();
		view.createControls();
		view.disableStopMenuItem();
		view.enableStartMenuItem();		
		//++
		this.model.initialize();
	}
	
	public void start()
	{
		model.on();
		view.disableStartMenuItem();
		view.enableStopMenuItem();
	}
	public void stop()
	{
		model.off();
		view.enableStartMenuItem();
		view.disableStopMenuItem();
	}
	public void increaseBPM()
	{
		int bpm = model.getBPM();
		model.setBPM(bpm + 1);
	}
	public void decreaseBPM()
	{
		int bpm = model.getBPM();
		model.setBPM(bpm - 1);
	}
	public void setBPM(int bpm)
	{
		model.setBPM(bpm);
	}
}
